import request from '@/utils/request'

export function fetchAttachmentList(data) {
  return request({
    url: '/cloud-system/getAttachmentList',
    method: 'post',
    data
  })
}

export function fetchAttachmentOne(data) {
  return request({
    url: '/cloud-system/getOneAttachmentDetail',
    method: 'post',
    data
  })
}

export function createAttachment(data) {
  return request({
    url: '/cloud-system/createOneAttachment',
    method: 'post',
    data
  })
}

export function updateAttachment(data) {
  return request({
    url: '/cloud-system/updateOneAttachment',
    method: 'post',
    data
  })
}

export function deleteAttachment(data) {
  return request({
    url: '/cloud-system/deleteOneAttachment',
    method: 'post',
    data
  })
}
export function batchDeleteAttachment(data) {
  return request({
    url: '/cloud-system/batchDeleteAttachment',
    method: 'post',
    data
  })
}

export function lockAttachment(data) {
  return request({
    url: '/cloud-system/lockOneAttachment',
    method: 'post',
    data
  })
}

export function unlockAttachment(data) {
  return request({
    url: '/cloud-system/unlockOneAttachment',
    method: 'post',
    data
  })
}

export function batchLockAttachment(data) {
  return request({
    url: '/cloud-system/batchLockAttachment',
    method: 'post',
    data
  })
}

export function batchUnLockAttachment(data) {
  return request({
    url: '/cloud-system/batchUnLockAttachment',
    method: 'post',
    data
  })
}
